﻿Imports GTA

Namespace OnlinePlayer
    Public Class DisableVehicleRadioScript
        Inherits Script
        Public Shared ReadOnly Toggle As Toggle = New Toggle(False)

        Private Sub DisableVehicleRadioScript_Tick(sender As Object, e As EventArgs) Handles Me.Tick
            If Toggle Then
                Dim v As Vehicle = PlayerPed.VehicleTryingToEnter
                If v IsNot Nothing Then
                    v.RadioStation = RadioStation.RadioOff
                ElseIf PlayerPed.IsInVehicle() Then
                    PlayerPed.CurrentVehicle.RadioStation = RadioStation.RadioOff
                End If
            End If
        End Sub
    End Class
End Namespace

